package com.threeCountry;

import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by yijy on 2017/5/31.
 */
public class TestThread {

    static ThreadLocal threadLocal = new ThreadLocal();
    public static void main(String[] args) {
        String str = "abcgdefgh";
        System.out.println(str.hashCode());
        str = str +"123";
        System.out.println(str.hashCode());
        StringBuilder builder = new StringBuilder("123");
        System.out.println(builder.hashCode());
        builder.append("123");
        System.out.println(builder.hashCode());
        ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();
        threadLocal.set("1");
        System.out.println(threadLocal.get());
        threadLocal.remove();
        System.out.println(threadLocal.get());
        threadLocal.set("2");
        threadLocal.set("3");
        System.out.println(threadLocal.get());
        System.out.println(threadLocal.get());
        System.out.println(threadLocal.get());



    }
}
